package com.xuzhen.designPattern.mediator.one;

public class IntelligenceMediator extends RentingMediator {
	private Renter renter;
	private Landlord landlord;

	@Override
	public void sendMessage(String message, House house) {
		if(house==renter){
			System.out.println(landlord.GetMessage(message));
		}else{
			System.out.println(renter.GetMessage(message));
		}
	}

	public Renter getRenter() {
		return renter;
	}

	public void setRenter(Renter renter) {
		this.renter = renter;
	}

	public Landlord getLandlord() {
		return landlord;
	}

	public void setLandlord(Landlord landlord) {
		this.landlord = landlord;
	}

}
